﻿using System.IO;

namespace analyze_lab2
{
    public class Parser
    {
        private string path;
        public int[] array { get; private set; }

        public Parser(string path)
        {
            array = new int[256];
            this.path = path;
        }

        public void Pars()
        {
            using (var stream = new FileStream(this.path, FileMode.Open))
            {
                for (int i = 0; i < stream.Length; i++)
                {
                    this.array[stream.ReadByte()]++;
                }
            }
        }
    }
}
